package org.jeecg.modules.cosmetic.controller;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.jeecg.common.api.vo.Result;
import org.jeecg.modules.cosmetic.handler.PictureOCRHandler;
import org.jeecg.modules.cosmetic.model.vo.PicturePathVO;
import org.springframework.web.bind.annotation.*;
import org.springframework.web.multipart.MultipartFile;

import javax.annotation.Resource;


@Api(tags = "图片识别")
@RestController
@RequestMapping("/api/ocr")
public class TPictureOCRController {

    @Resource
    private PictureOCRHandler pictureOCRHandler;

    @ApiOperation(value = "包装审核-图片识别-base64", notes = "图片识别-接收文件")
    @PostMapping("/scanBase64")
    public Result<?> scanBase64Picture(@RequestBody PicturePathVO vo) {
        return pictureOCRHandler.scanBase64Picture(vo.getBase64());
    }

    @ApiOperation(value = "包装审核-图片识别-path", notes = "图片识别-地址")
    @PostMapping("/scanPath")
    public Result<?> scanPathPicture(@RequestBody PicturePathVO vo) {
        return pictureOCRHandler.scanPathPicture(vo);
    }

}
